package com.hspedu.reflection.classLoad;

/**
 * @author DL5O
 * @version 1.0
 */
public class ClassLoad02 {
    public static void main(String[] args) {

        //在类加载的初始化阶段,并进行合并
        /*
            clinit(){

                 System.out.println("B类中静态代码块被执行");
                 num = 200;
                 num = 300;
                 static final  int num1 = 400;
            }
         */
        System.out.println(B.num);//B类中静态代码块被执行
        //300
    }
}

class B{
    static{
        System.out.println("B类中静态代码块被执行");
        num = 200;
    }

    static int num = 300;

    static final  int num1 = 400;


}

